'use strict';
var calculate_average = function(collection)
{
    let t=0;
    let a=0;
    for (let i =1;i<collection.length+1;i++)
        {
            if (i%2==0)
                {
                    t+=collection[i-1];
                    a+=1;
                }
        }
    t/=a;
    return t;
};
module.exports = calculate_average;
